import { Key } from 'react'
import { KfTreeNode } from '@/utils/tree'

export interface XlMetaPageQueryParams extends Partial<any> {
  ids?: Key[]
  searchText?: string
  parentId?: number
}

export interface XlMetaTreeQueryParams {
  parentId?: number
}

export interface XlMeta {
  id: Key
  parentId?: Key
  name?: string
  createTime?: string
  modifyTime?: string
  seq?: number
}

export interface XlMeta_Summary {
  //主键
  id?: Key
  //名称
  name?: string
  description?: string
}

export interface XlMeta_TreeNode extends XlMeta, KfTreeNode {
  id: Key
  parentsId?: string[]
  parentsName?: string[]
  children?: XlMeta_TreeNode[]
}

export interface XlMeta_Create {
  icon?: string
  title: string
  parentId: number
  seq: number
}

export interface XlMeta_Modify extends XlMeta_Create {
  id: Key
}

export interface XlMeta_Patch extends Partial<XlMeta_Create> {
  id: Key
}
